package com.manage.dao;

import com.manage.pojo.entity.CmCase;
import com.manage.pojo.entity.CmSysAttachment;
import com.manage.pojo.entity.case_manage.*;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Mapper
public interface CmCaseManageMapper {
    /**
     * 查询案件管理导航栏信息
     */
    CaseManageDataInfo selectCmCaseManageData(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询案件管理列表数据
     */
    List<CaseManageDataList> selectCmCaseManageDataList(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询承接律师列表
     */
    List<String> selectGranteeLawyerList(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询主办律师列表
     */
    List<String> selectSponsorLawyerList(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询负责律师列表
     */
    List<String> selectPrincipalLawyerList(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询银行列表
     */
    List<String> selectBankList(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询支行列表
     */
    List<String> selectBankBranchList(@Param("caseManageParam") CaseManageParam caseManageParam);

    /**
     * 查询律师费总金额
     */
    BigDecimal sumClosedCaseLawyerFeeAmount();

    /**
     * 查询案件结算详情
     */
    CaseResultDto caseResult(CaseResultParam caseResultParam);

    /**
     * 查询分配案件列表
     */
    List<CaseAssignList> caseAssignList(CaseAssignParam caseAssignParam);

    /**
     * 查询分配案件接收人员 --主办律师
     */
    @MapKey("userId")
    Map<Integer,String> selectAssignList();

    /**
     * 查询移交案件列表
     */
    List<CaseTransferList> caseTransferList(CaseTransferParam caseTransferParam);

    /**
     * 查询委托记录
     */
    CaseEntrustedRecordDto caseEntrustedRecord(CaseEntrustedRecordParam caseEntrustedRecordParam);

    /**
     * 通过附件ID获取表SysAttachment的实体类
     */
    CmSysAttachment selectFileAttachment(Long fileId);

    /**
     * 查询委托对应的所有案件
     */
    List<CmCase> caseEntrustedList(CaseEntrustedParam caseEntrustedParam);

    /**
     *  案件分配确认
     */
    Integer caseAssignConfirm(CaseAssignConfirmParam caseAssignConfirmParam);

    /**
     *  案件移交确认
     */
    Integer caseTransferConfirm(CaseTransferConfirmParam caseTransferConfirmParam);
}
